package com.hebeu.device.controller;

import com.github.pagehelper.PageInfo;
import com.hebeu.device.pojo.DClient;
import com.hebeu.device.pojo.DMaintenance;
import com.hebeu.device.pojo.DPayoff;
import com.hebeu.device.service.DMaintenanceService;
import com.hebeu.device.service.DPayoffService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;


@RestController
@RequestMapping("/payoff/")
public class PayoffController {
    @Resource
    private DMaintenanceService dMaintenanceService;
    @Resource
    private DPayoffService dPayoffService;

    @RequestMapping("findDPayoffList")
    public PageInfo<DPayoff> findDPayoffList(DPayoff dPayoff){
        System.out.println("supervision进入结算信息的方法");
        List<DPayoff> dPayoffList=dPayoffService.selectDPayoff(dPayoff);
        PageInfo<DPayoff> dPayoffPageInfo=new PageInfo<>(dPayoffList);
        return dPayoffPageInfo;
    }
    @RequestMapping("findDPayoffInfo")
    public DPayoff findDPayoffInfo(Integer serviceId){
        return dPayoffService.selectDPayoffListByServiceId(serviceId);
    }




}
